#include <bits/stdc++.h>

#define int long long

using namespace std;

// int chick(int x,int y)
// {
//     std::cout << "? " << x << " " << y << endl;
//     int res;
//     std::cin >> res;
//     return res;
// }
//  std::cout << "! " << x << endl;


void solve()
{
    int n;
    cin >> n;
    vector<pair<int,int>> arr(n + 10);
    int node = 0;
    int len = 0;
    for(int i = 1; i <= n; i ++)
    {
        cout << "?" << ' ' << i << ' ' << n << ' ';
        for(int j = 1; j <= n; j ++)
        {
            if(j != n) cout << j << ' ';
            else cout << j;
        }
        cout << endl;
         cout.flush();
        int res;
        cin >> res;
        arr[i].first = res;
        arr[i].second = i;
        if(res > len)
        {
            len = res;
            node = i;
        }
    }
    vector<int> ans;
    sort(arr.begin() + 1,arr.begin() + 1 + n,greater<pair<int,int>>());
    int lens = arr[1].first - 1;
    ans.push_back(node);
    for(int i = 1; i <= n; i ++)
    {
        if(lens == arr[i].first)
        {
            cout << "?" << ' ' << node << ' ' << 2 << ' ' << node << ' ' << arr[i].second << endl;
             cout.flush();
            int res;
            cin >> res;
            // cout << res << endl;
            if(res == 2)
            {
                ans.push_back(arr[i].second);
                lens--;
                node = arr[i].second;
            }  
        }
    }  
    cout << "!" << ' ' << ans.size() << ' ';

    for(int i = 0; i < ans.size(); i ++)
    {
        if(i != ans.size() - 1)
        cout << ans[i] << ' ';
        else 
        {
           cout << ans[i];
        }
    }
    cout << endl;
     cout.flush();
}

signed main()
{
    int t;
    cin >> t;
    while(t --)
    {
        solve();
    }
}